package com.csun.cmny.provider.dao;


import com.csun.cmny.provider.pojo.OldmanNurseHi;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OldmanNurseHiMapper {
    int deleteByPrimaryKey(Integer historyId);

    int insert(OldmanNurseHi record);

    int insertSelective(OldmanNurseHi record);

    OldmanNurseHi selectByPrimaryKey(Integer historyId);

    int updateByPrimaryKeySelective(OldmanNurseHi record);

    int updateByPrimaryKey(OldmanNurseHi record);

    /**
     * 根据老人ID查询所有护理记录
     * @param oldmanId
     * @return
     */
    List<OldmanNurseHi> getAllHistoryByOldmanId(@Param("oldmanId") Integer oldmanId);

    /**
     * 根据老人ID删除所有护理记录
     * @param oldmanId
     * @return
     */
    int deleteByOldmanId(@Param("oldmanId") Integer oldmanId);

    OldmanNurseHi selectRecentNurse(@Param("oldmanId") Integer oldmanId);
}